import request from '@/utils/request';

/**
 * 表单流程管理
 */
// 通过任务
export function approveReport(data) {
  return request({
    url: 'bpm/task/approve',
    method: 'put',
    data,
  });
}

// 不通过任务
export function rejectReport(data) {
  return request({
    url: 'bpm/task/reject',
    method: 'put',
    data,
  });
}
// 获取流程实例
export function getProcessInstance(params) {
  return request({
    url: 'bpm/task/list-by-process-instance-id',
    method: 'get',
    params,
  });
}

// 获得指定流程实例 获取流程弹窗信息
export function getProcessModalInfo(params) {
  return request({
    url: 'bpm/process-instance/get',
    method: 'get',
    params,
  });
}
// 取消流程
export function cancelProcessInstance(data) {
  return request({
    url: '/bpm/process-instance/cancel',
    method: 'DELETE',
    data,
  });
}
